package io;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class RemoveSvn {

	private List<File> files;
	private List<String> types;

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		String srcPath = "E:/SVN/mavnexport/cloudflightserver";
		/*
		 * Collection<File> javaGbkFileCol = FileUtils.listFiles( new
		 * File(srcPath), null, true); for (File f : javaGbkFileCol) {
		 * System.out.print(f.getName()); if (f.isDirectory() &&
		 * f.getName().equals(".svn")) { if (f.delete()) {
		 * System.out.print("Success"); } ; } System.out.println(""); }
		 */
		RemoveSvn rs = new RemoveSvn();
		rs.findFiles(new File(srcPath));
		
	}

	public RemoveSvn() {
		files = new ArrayList<File>();
	}

	public void findFiles(File f) {
		if (f.isFile()) {
			return;
		}
		if (f.isDirectory()) {
			if(types.contains(f.getName())){
				files.add(f);
				return;
			}
			File[] fils = f.listFiles();
			for (File ff : fils) {
				findFiles(ff);
			}
		}
	}

}
